﻿using DAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.Data;


namespace BLL
{  
   public class AbandonBLL
    {
        private AbandonDAL ADAL = new AbandonDAL();

        /// <summary>
        /// 获取报废出库列表
        /// </summary>
        /// <returns></returns>
        public DataSet GetAbandonList()
        {
            return ADAL.GetAbandonList();
        }

        /// <summary>
        /// 报废明细
        /// </summary>
        /// <returns></returns>
        public DataSet GetAbandonedDetail(string FBillNo, string Ry, string date)
        {
            return ADAL.GetAbandonedDetail( FBillNo,  Ry,   date);

        }

        /// <summary>
        /// 查询报废剩余数量
        /// </summary>
        /// <param name="FBillNo"></param>
        /// <param name="Ry"></param>
        /// <returns></returns>
        public int GetAbandonLeftQty(string FBillNo, string Ry, string date)
        {
               return ADAL.GetAbandonLeftQty(FBillNo, Ry, date);
        }

        //获取条码信息
        public bool GetCode(string PkgsBarCode, out string PlaceBarCode, out string PlaceName, out string Floor, out string Fsku, out string StickLen, out string Stick, out string FQty, out string dc)
        {
            return ADAL.GetCode(PkgsBarCode, out  PlaceBarCode, out  PlaceName, out  Floor, out  Fsku, out  StickLen, out  Stick, out  FQty, out  dc);
        }


        /// <summary>
        /// 更新报废出库
        /// </summary>
        /// <param name="PkgsBarCode"></param>
        /// <param name="PkgsID"></param>
        /// <returns></returns>
        public int UpdateAbandonedDetail(string PkgsBarCode, string PkgsID, string uid)
        {
            return ADAL.UpdateAbandonedDetail(PkgsBarCode, PkgsID, uid);
        }

        /// <summary>
        /// 完成报废出库
        /// </summary>
        /// <param name="FBillNo"></param>
        /// <returns></returns>
        public bool FinishAbandoned(string FBillNo,out string txt)
        {
            return ADAL.FinishAbandoned(FBillNo, out  txt); 
        }

    }
}
